/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package soatonline.gui;

import java.awt.MouseInfo;
import java.awt.Point;
import soatonline.VO.Fondo;

/**
 *
 * @author Oskar
 */
public class FrameActividad extends javax.swing.JFrame {

    int x;
    int y;

    /**
     * Creates new form PruebaFrame
     */
    public FrameActividad() {
        setUndecorated(true);
        initComponents();
        this.ponerfondo("/imagenes/LogoFinal.png");
        setLocationRelativeTo(null);
    }

    FrameActividad(String idProfesional) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLBRegistrar = new javax.swing.JLabel();
        jLBRegistrarCliente = new javax.swing.JLabel();
        jLBLLamarCliente = new javax.swing.JLabel();
        jLBConsultarInformacion = new javax.swing.JLabel();
        jLBActualizarInformacion = new javax.swing.JLabel();
        jLBActualizar = new javax.swing.JLabel();
        jLBLlamar = new javax.swing.JLabel();
        jLBConsultar = new javax.swing.JLabel();
        jLBSalir = new javax.swing.JLabel();
        jLBModoAdmin = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("WWW.SOATONLINE.COM");

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                jPanel1MousePressed(evt);
            }
        });
        jPanel1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jPanel1MouseDragged(evt);
            }
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                jPanel1MouseMoved(evt);
            }
        });

        jLBRegistrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/usuario_1.png"))); // NOI18N
        jLBRegistrar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBRegistrar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBRegistrarMouseReleased(evt);
            }
        });

        jLBRegistrarCliente.setText("Registar Cliente");
        jLBRegistrarCliente.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBRegistrarCliente.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBRegistrarClienteMouseReleased(evt);
            }
        });

        jLBLLamarCliente.setText("Cotizar Soat");
        jLBLLamarCliente.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBLLamarCliente.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBLLamarClienteMouseReleased(evt);
            }
        });

        jLBConsultarInformacion.setText("Consultar Información");
        jLBConsultarInformacion.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBConsultarInformacion.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBConsultarInformacionMouseReleased(evt);
            }
        });

        jLBActualizarInformacion.setText("Actualizar Informacion");
        jLBActualizarInformacion.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBActualizarInformacion.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBActualizarInformacionMouseReleased(evt);
            }
        });

        jLBActualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/actualizarfinal.png"))); // NOI18N
        jLBActualizar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBActualizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBActualizarMouseReleased(evt);
            }
        });

        jLBLlamar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/calcu2.png"))); // NOI18N
        jLBLlamar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBLlamar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBLlamarMouseReleased(evt);
            }
        });

        jLBConsultar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/lupa.png"))); // NOI18N
        jLBConsultar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBConsultar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBConsultarMouseReleased(evt);
            }
        });

        jLBSalir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/salir.png"))); // NOI18N
        jLBSalir.setToolTipText("Salir");
        jLBSalir.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBSalir.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                jLBSalirMouseReleased(evt);
            }
        });

        jLBModoAdmin.setText("Modo Administrador");
        jLBModoAdmin.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLBModoAdmin.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLBModoAdminMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jLBModoAdminMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jLBModoAdminMouseExited(evt);
            }
        });

        jLabel1.setText("¿Quienes Somos?");
        jLabel1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        jLabel2.setText("Ayuda");
        jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(44, 44, 44)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLBModoAdmin)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel2)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLBSalir)
                        .addGap(42, 42, 42))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLBRegistrar)
                                .addGap(18, 18, 18)
                                .addComponent(jLBRegistrarCliente))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLBActualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLBActualizarInformacion)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLBLlamar)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLBLLamarCliente)
                                .addGap(46, 46, 46))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLBConsultar)
                                .addGap(18, 18, 18)
                                .addComponent(jLBConsultarInformacion)))
                        .addGap(55, 55, 55))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(134, 134, 134)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLBLlamar)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(149, 149, 149)
                                .addComponent(jLBActualizar))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(38, 38, 38)
                                .addComponent(jLBConsultarInformacion)
                                .addGap(114, 114, 114)
                                .addComponent(jLBLLamarCliente))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(40, 40, 40)
                                .addComponent(jLBRegistrarCliente))
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLBConsultar)
                                .addComponent(jLBRegistrar, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(84, 84, 84)
                        .addComponent(jLBActualizarInformacion)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE)
                .addComponent(jLBSalir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLBModoAdmin)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addGap(22, 22, 22))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void ponerfondo(String url) {
        this.jPanel1.add(new Fondo(this.getSize(), url));
        repaint();
    }
    private void jPanel1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MousePressed

        x = evt.getX();
        y = evt.getY();
    }//GEN-LAST:event_jPanel1MousePressed

    private void jPanel1MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MouseMoved

    }//GEN-LAST:event_jPanel1MouseMoved

    private void jPanel1MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MouseDragged
        Point point = MouseInfo.getPointerInfo().getLocation();
        setLocation(point.x - x, point.y - y);
    }//GEN-LAST:event_jPanel1MouseDragged
    private void jLBSalirMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBSalirMouseReleased
        System.exit(0);
    }//GEN-LAST:event_jLBSalirMouseReleased

    private void jLBRegistrarClienteMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBRegistrarClienteMouseReleased
        new FrameRegistro_Cliente().setVisible(true);
        this.dispose();
    }//GEN-LAST:event_jLBRegistrarClienteMouseReleased

    private void jLBRegistrarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBRegistrarMouseReleased
        new FrameRegistro_Cliente().setVisible(true);
        this.dispose();
    }//GEN-LAST:event_jLBRegistrarMouseReleased

    private void jLBModoAdminMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBModoAdminMouseClicked
        new FrameLogin().setVisible(true);
        this.dispose();
    }//GEN-LAST:event_jLBModoAdminMouseClicked

    private void jLBModoAdminMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBModoAdminMouseEntered
       // this.jLBModoAdmin.setText("<html><u>Modo Administrador</u></html>");
    }//GEN-LAST:event_jLBModoAdminMouseEntered

    private void jLBModoAdminMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBModoAdminMouseExited
      //  this.jLBModoAdmin.setText("Modo Administrador");
    }//GEN-LAST:event_jLBModoAdminMouseExited

    private void jLBConsultarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBConsultarMouseReleased
    new FrameConsultaInf().setVisible(true);
    this.dispose();
    }//GEN-LAST:event_jLBConsultarMouseReleased

    private void jLBConsultarInformacionMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBConsultarInformacionMouseReleased
    new FrameConsultaInf().setVisible(true);
    this.dispose();
    }//GEN-LAST:event_jLBConsultarInformacionMouseReleased

    private void jLBLlamarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBLlamarMouseReleased
    new FrameCotizacion().setVisible(true);
    this.dispose();
    }//GEN-LAST:event_jLBLlamarMouseReleased

    private void jLBLLamarClienteMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBLLamarClienteMouseReleased
    new FrameCotizacion().setVisible(true);
    this.dispose();
    }//GEN-LAST:event_jLBLLamarClienteMouseReleased

    private void jLBActualizarInformacionMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBActualizarInformacionMouseReleased
    new FrameActualizar_Datos().setVisible(true);
    this.dispose();
    }//GEN-LAST:event_jLBActualizarInformacionMouseReleased

    private void jLBActualizarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLBActualizarMouseReleased
    new FrameActualizar_Datos().setVisible(true);
    this.dispose();
    }//GEN-LAST:event_jLBActualizarMouseReleased

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrameActividad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrameActividad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrameActividad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrameActividad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FrameActividad().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLBActualizar;
    private javax.swing.JLabel jLBActualizarInformacion;
    private javax.swing.JLabel jLBConsultar;
    private javax.swing.JLabel jLBConsultarInformacion;
    private javax.swing.JLabel jLBLLamarCliente;
    private javax.swing.JLabel jLBLlamar;
    private javax.swing.JLabel jLBModoAdmin;
    private javax.swing.JLabel jLBRegistrar;
    private javax.swing.JLabel jLBRegistrarCliente;
    private javax.swing.JLabel jLBSalir;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
